<!DOCTYPE HTML>
<html>
<head>
    <title>公共列表页面</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="mini-fit">
    <div id="tabs1" class="mini-tabs" activeIndex="0" style="width: 100%; height: 100%;">
        <#list tabList>
            <#items as resource>
                <div title="${resource.name!}" url="${resource.action!}?id=${(resource.id?c)!''}"></div>
            </#items>
        </#list>
    </div>
</div>
<script type="text/javascript">
    mini.parse();
    $(function (){
        var url = window.location.href;

        if(url.indexOf("&zdbjdx") >= 0 ) {//首页-重点帮教
            updateTable("247110428295168","帮教管理","/basic/public-list/view",4,"zdbjdx");
        }else if(url.indexOf("&hcsb") >= 0 ) {//首页-核查失败人数
            updateTable("247553952546816", "核查失败人员", "/resettlemanage/hcxx/view", 4);
        }else if(url.indexOf("&jy_xj") >= 0 ) {//铃铛（监狱_待衔接）
            updateTable("247545239158784","待衔接","/resettlemanage/xjxx/view",2);
        }else if(url.indexOf("&sft_sb=sft_sb") >= 0 ) {//铃铛（司法厅）
            updateTable("247158265315328","待办工作","/basic/public-list/view",2);
        }else if(url.indexOf("&dxj") >= 0 ) {//首页-带衔接
            updateTable("247545239158784","待衔接","/resettlemanage/xjxx/view",2);
        }else if(url.indexOf("&zddxj") >= 0 ) {//首页-待衔接重点帮教人数
            updateTable("247545239158784","待衔接","/resettlemanage/xjxx/view",2,"zddxj");
        }else if(url.indexOf("&wxj") >= 0 ) {//首页-未衔接
            updateTable("246737016684544","未衔接","/resettlemanage/xjxx/view",6);
        }else if(url.indexOf("&sfs_wxjrs") >= 0 ) {//首页-未衔接人数
            updateTable("246737016684544","未衔接","/resettlemanage/xjxx/view",4);
        }else if(url.indexOf("&wlryzbx") >= 0 ) {//首页-未进行危险评估人数
            updateTable("246737901289472","信息补录","/resettlemanage/xjxx/view",1,"wlryzbx");
        }else if(url.indexOf("&jyj_hccg") >= 0 ){//监狱局-核查成功
            updateTable("247158246572032","核查成功人员","/basic/public-list/view",2);
        }else if(url.indexOf("&jyj_hcsb") >= 0 ){//监狱局-核查失败
            updateTable("247553952546816","核查失败人员","/resettlemanage/hcxx/view",3);
        }else if(url.indexOf("&jyj_yxj") >= 0 ) {//监狱局-已衔接
            updateTable("247177213722624","已衔接","/resettlemanage/xjxx/view",2);
        }else if(url.indexOf("&jyj_xjsb") >= 0 ) {//监狱局-衔接失败
            updateTable("247317347663872","衔接失败","/resettlemanage/xjxx/view",3);
        }else if(url.indexOf("&jyj_jsqy") >= 0 ) {//监狱局-接受迁移
            updateTable("258228888125440","接收迁移","/basic/public-list/view",2);
        }else if (url.indexOf("&sj_hccg") >= 0){//社矫-核查成功
            updateTable("247158246572032","核查成功","/basic/public-list/view",2);
        }else if (url.indexOf("&sj_hcsb") >= 0){//社矫-核查成功
            updateTable("247553952546816","核查失败","/resettlemanage/hcxx/view",3);
        }else if (url.indexOf("&sj_xjz") >= 0){//社矫-衔接中
            updateTable("246737013866496","衔接中","/resettlemanage/xjxx/view",1);
        }else if (url.indexOf("&sj_xjcg") >= 0){//社矫-核查成功
            updateTable("247177213722624","衔接成功","/resettlemanage/xjxx/view",2);
        }else if (url.indexOf("&sj_xjsb") >= 0){//社矫-核查成功
            updateTable("247317347663872","衔接失败","/resettlemanage/xjxx/view",3);
        }else if (url.indexOf("&hjqc") >= 0){//跳转户籍迁出人员管理
            updateTable("260324667031562","户籍迁出人员管理","/basic/public-list/view",1);
        }else if (url.indexOf("&hjqr") >= 0){//跳转户籍迁入人员管理
            updateTable("260324667031561","户籍迁入人员管理","/basic/public-list/view",2);
        }
    })

    /**
     * 公用切换tab的方法
     * @param id 要到达的tab页的url的id
     * @param text 要到达的tab页的url的名称
     * @param path 要到达的tab页的url的地址
     * @param createLocation 创建位置,从1开始
     * @param alone 单独的功能
     */
    function updateTable(id,text,path,createLocation,alone){
        var item = {
            id: id,
            text: text,
            url: path
        };
        //当前页面的tab的ID
        var tabs = mini.get("tabs1");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            if(alone!=null&&alone!=''){
                url += "&"+alone;
            }
            tab = {name: item.id, title: item.text, url: url};
            //明确生成位置
            tabs.addTab(tab,createLocation);
        }
        //删除原有的tab
        tabs.removeTab(createLocation-1);
        //新增tab
        tabs.activeTab(tab);
    }
</script>
</body>
</html>